<template>
    <div>
        <el-table :data="tempList" border class="wPer100">
            <el-table-column prop="id" label="收集id" width="65">
            </el-table-column>
            <el-table-column prop="name" label="收集姓名" width="120">
            </el-table-column>
            <el-table-column prop="phone" label="收集电话" width="150">
            </el-table-column>
            <el-table-column label="收集类型" width="100">
                <template slot-scope="scope">
                    {{ 
                        scope.row.type == 1 ? '加盟合作' :
                        scope.row.type == 2 ? '股东分红' : scope.row.type
                    }}
                </template>
            </el-table-column>
            <el-table-column prop="date" label="创建时间">
            </el-table-column>
        </el-table>
        <div class="floRight mt30 pb40">
            <el-pagination :current-page="currentPage" :total="total1"
                :page-sizes="[10]" :page-size="pageSize"
                background layout="prev, pager, next, total, jumper"
                @current-change="handleCurrentChange"
            />
        </div>
    </div>
</template>
<script>
import { getcollectDataList } from '@s/api'
export default {
    data() {
        return {
            currentPage: 1,
            pageSize: 10,
            tempList: [],
            total1: 0,
        }
    },
    mounted() {
        this.getDataList1();
    },
    methods: {
        getDataList1() {
            getcollectDataList({
                token: this.$store.getters.token,
            }).then(res => {
                console.log(123, res)
                this.tempList = res.data.data;
                this.total1 = res.data.count;
            })
        },
        handleCurrentChange(currentPage) {
            this.currentPage = currentPage;
            this.getDataList1();
        },
    }
}
</script>